﻿using System.Data;
using System.Drawing;

namespace DevelopTool.Forms.CommonHelpers
{
    public class BaseHelper
    {
        /// <summary>
        /// 忽略某些列
        /// </summary>
        /// <param name="dataTable"></param>
        protected static void IgnoringColumns(DataTable dataTable)
        {
            for (int i = 0; i < dataTable.Columns.Count; i++)
            {
                DataColumn dataColumn = dataTable.Columns[i];
                if (dataColumn.DataType == typeof(Icon))//忽略Icon类型的列
                {
                    dataTable.Columns.RemoveAt(i);
                }
            }
        }
    }
}
